home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / lib-6.9.tar.gz / lib-6.9.tar / texmf / tex / tugboat / makefile.unx < prev    next >
Makefile  |  1992-09-27  |  3KB  |  128 lines

  1. # ======================================================================
  2. # Makefile for files in ~beebe/tex/tugboat
  3. # This constructs the tugboat.bib file from the tb*.cnt files using
  4. # the awk program tugboat.awk, and then produces complete test
  5. # bibliographies in alpha and unsrt form.  A kwic index of the
  6. # bibliography is also produced:
  7. #
  8. # Targets:
  9. # all        tugbib + tugbib2 + kwic
  10. # tugbib    bibliography in alpha order 
  11. # tugbib2    bibliography in unsrt order 
  12. # kwic        keyword-in-context index to tugboat.bib.  Must be printed
  13. #        in landscape orientation.
  14. # clean        remove files that can be recreated by running make again
  15. # [29-Oct-88]
  16. # ======================================================================
  17.  
  18. AWK = nawk
  19.  
  20. BIBTEX = nbibtex
  21. BIBTEX = bibtex
  22.  
  23. DETEX = detex
  24.  
  25. DEV = alw
  26.  
  27. # We need a BIGG version of Common TeX to handle this big bibliography
  28. # LATEX = cm-latex
  29. LATEX = latex
  30.  
  31. RM = rm -f
  32.  
  33. TEX = tex
  34.  
  35. .SUFFIXES:
  36.  
  37. .SUFFIXES:    .aux .dvi-$(DEV) .dvi .spell .ltx .tex .kwic .ptx .bbl .bib
  38.  
  39. .bib.bbl:
  40.     - $(NBIBTEX) $*
  41.  
  42. .bib.ptx:
  43.     nawk -f kwic-bib.awk <$< | ptx -r -f >$@
  44.  
  45. .dvi.dvi-$(DEV):
  46.     dvi$(DEV) -m$(MAG) $<
  47.     cp $*.dvi-$(DEV) /$(DEV)
  48.     rm -f $@
  49.  
  50. .ltx.aux .ltx.dvi:
  51.     - $(LATEX) $<
  52.  
  53. .ltx.spell:
  54.     $(DETEX) $< | spell >$@
  55.  
  56. .ptx.kwic:
  57.     sed -f ptx.sed <$< >$@
  58.  
  59. .tex.aux .tex.dvi:
  60.     $(TEX) $<
  61.  
  62. .tex.spell:
  63.     $(DETEX) $< | spell >$@
  64.  
  65. TUGCONTENTS = tb0180.cnt tb0281.cnt tb0382.cnt tb0483.cnt tb0584.cnt \
  66.     tb0685.cnt tb0786.cnt tb0887.cnt tb0988.cnt tb1089.cnt \
  67.     tb1190.cnt tb1291.cnt
  68.  
  69. # For temporary debugging
  70. # TUGCONTENTS = tb0988.cnt
  71.  
  72. all:    tugbib tugbib2 kwic
  73.  
  74. kwic:    kwic.dvi
  75.  
  76. kwic.dvi:    tugboat.kwic
  77.  
  78. tugboat.kwic:    tugboat.ptx ptx.sed
  79.  
  80. tugboat.ptx:    tugboat.bib kwic-bib.awk
  81.  
  82. tugbib:    tugbib.dvi
  83.  
  84. # tugbib is in alpha order; this is preferable to plain (which gives
  85. # the same reference order) so we can test the correctness of alphanumeric
  86. # bibliography labels.
  87. tugbib.dvi:    tugbib.ltx tugboat.bib
  88.     - $(RM) tugbib.bbl
  89.     - $(RM) tugbib.aux
  90.     - $(LATEX) tugbib.ltx
  91.     - $(BIBTEX) tugbib
  92.     - $(LATEX) tugbib.ltx
  93.     - $(LATEX) tugbib.ltx
  94.  
  95. tugbib.bbl:    tugbib.aux tugboat.bib
  96.     $(BIBTEX) tugbib
  97.  
  98. tugbib2:    tugbib2.dvi
  99.  
  100. # tugbib2 is in unsrt order for checking the bibliography against the
  101. # original TUGboat tables of contents
  102. tugbib2.dvi:    tugbib2.ltx tugboat.bib
  103.     - $(RM) tugbib2.bbl
  104.     - $(RM) tugbib2.aux
  105.     - $(LATEX) tugbib2.ltx
  106.     - $(BIBTEX) tugbib2
  107.     - $(LATEX) tugbib2.ltx
  108.     - $(LATEX) tugbib2.ltx
  109.  
  110. tugbib2.bbl:    tugbib2.aux tugboat.bib
  111.     - $(BIBTEX) tugbib2
  112.  
  113. tugboat.bib:    $(TUGCONTENTS) tugboat.awk
  114. #    $(AWK) -f tugboat.awk $(TUGCONTENTS) >tugboat.bib
  115.     $(AWK) -f tugboat.awk $(TUGCONTENTS) | bibclean >tugboat.bib
  116.     echo ==== Hand-edit tugboat.def to fix tail-end definitions ====
  117.  
  118. clean:
  119.     @- $(RM) *.aux
  120.     @- $(RM) *.blg
  121.     @- $(RM) *.bbl
  122.     @- $(RM) *.dvi*
  123.     @- $(RM) *.log
  124.     @- $(RM) *.lst
  125.     @- $(RM) *.ptx
  126.     @- $(RM) *.kwic
  127.     @- $(RM) *~*
  128.